package com.efast.dmom.mgmt.controller.mes;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.efast.cafe.framework.bean.ResultBean;
import com.efast.dmom.mgmt.bean.mes.LotInAndOutBean;
import com.efast.dmom.mgmt.service.mes.TrBasLotInAndOutService;

/**
 * 
 * @author wj
 * 拉入拉出模块
 *
 */

@Controller
@RequestMapping(value = "/lotInAndOut")
public class TrBasLotInAndOutController {

	@Autowired
	private TrBasLotInAndOutService trBasLotInAndOutService;
	
	// 对lot进行拉出操作
	@RequestMapping(value = "/pullOutByLotId",method = RequestMethod.POST)
    public @ResponseBody ResultBean pullOutByLotId(@RequestBody LotInAndOutBean inAndOutData) {
//		ResultBean result = new ResultBean(true, "'");
		ResultBean result = trBasLotInAndOutService.pullOutByLotId(inAndOutData);
		return result;
	}
	
	// 对lot进行拉入操作
	@RequestMapping(value = "/takeInByLotId",method = RequestMethod.POST)
    public @ResponseBody ResultBean takeInByLotId(@RequestBody LotInAndOutBean inAndOutData) {
//		ResultBean result = new ResultBean(true, "'");
		ResultBean result = trBasLotInAndOutService.takeInByLotId(inAndOutData);
		return result;
	}
}
